package com.xiaren.ui.edit;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JTabbedPane;

import com.xiaren.common.ObjectConstant;

/**
 * @主页 http://www.leaf123.cn/
 * @邮箱 xia5523@qq.com
 */
public class MainEdit extends JTabbedPane {
	public String editId = "note soft.txt";
	//	List<FileEdit> listEdit = new ArrayList<FileEdit>();
	EditRightWindow rightMenu;

	public MainEdit(int tabPlacement) {
		super(tabPlacement);
		ObjectConstant.mainEdit = this;
	}

	void initCommpent() {

//		this.setBackground(Color.yellow);

	}


	public void init() {
		initCommpent();

		this.addMouseListener(new MouseAdapter() {
			public void mouseReleased(MouseEvent e) {
				if (e.isPopupTrigger()) {
					// 弹出右键菜单
					rightMenu = new EditRightWindow();
					rightMenu.show(e.getComponent(), e.getX(), e.getY());
				}
			}
		});

	}



}
